/**
 * 
 */
package de.cbf.cam.dsa.dataprovider.weapons;

import java.util.ArrayList;
import java.util.List;

import de.cbf.cam.dsa.model.entities.WeaponStyle;
import de.cbf.cam.dsa.model.entities.constants.WeaponStyleTemplates;
import de.cbf.cam.dsa.model.entities.weapon.WeaponMelee;

/**
 * @author Nebelritter
 *
 */
public class ProviderSwords {
	
	private static ProviderSwords instance = new ProviderSwords();
	
	public static ProviderSwords getInstance(){
		return instance;
	}
	
	public List<WeaponMelee> provideSwords(){
		List<WeaponMelee> resultList = new ArrayList<WeaponMelee>();
		resultList.add(provideLangSchwert());
		resultList.add(provideKurzSchwert());
		return resultList;
	}
	
	private WeaponMelee provideKurzSchwert() {
		WeaponMelee weapon = new WeaponMelee();
		weapon.setWeaponType("Kurzschwert");
		weapon.setTpDiceNumber(1);
		weapon.setTpDiceSides(6);
		weapon.setTpBonus(2);		
		weapon.setKKTreshold(11);
		weapon.setKKStep(4);
		weapon.setWeight(40);
		weapon.setWeapLength(50);
		weapon.setBf(0);
		weapon.setIniMod(1);
		weapon.setPrice(80);
		weapon.setWmAT(0);
		weapon.setWmPA(-1);	
		weapon.setDkBits(WeaponMelee.DKN|WeaponMelee.DKH);
		weapon.setWear("");
		//weapon styles
		WeaponStyle style = WeaponStyleTemplates.provideSchwerter();
		style.setName("Kurzschwert");		
		weapon.addStyle(style);
		style = WeaponStyleTemplates.provideDolche();
		style.setName("Kurzschwert");
		weapon.addStyle(style);
		style = WeaponStyleTemplates.provideSaebel();
		style.setName("Kurzschwert");
		weapon.addStyle(style);
		return weapon;
	}

	private WeaponMelee provideLangSchwert(){
		WeaponMelee weapon = new WeaponMelee();
		weapon.setWeaponType("Langschwert");
		weapon.setTpDiceNumber(1);
		weapon.setTpDiceSides(6);
		weapon.setTpBonus(4);		
		weapon.setKKTreshold(11);
		weapon.setKKStep(4);
		weapon.setWeight(80);
		weapon.setWeapLength(95);
		weapon.setBf(1);
		weapon.setIniMod(0);
		weapon.setPrice(180);
		weapon.setWmAT(0);
		weapon.setWmPA(0);	
		weapon.setDkBits(WeaponMelee.DKN);
		weapon.setWear("");
		//weapon styles
		WeaponStyle style = WeaponStyleTemplates.provideSchwerter();
		style.setName("Langschwert");
		
		weapon.addStyle(style);
		return weapon;
	}
	
}
